projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcb242c
)
(Fexpand_file_name): Check length > 0 when necessary.
author
Richard M. Stallman
<rms@gnu.org>
Tue, 29 Apr 1997 00:51:47 +0000
(
00:51
+0000)
committer
Richard M. Stallman
<rms@gnu.org>
Tue, 29 Apr 1997 00:51:47 +0000
(
00:51
+0000)
src/fileio.c
patch
|
blob
|
history
diff --git
a/src/fileio.c
b/src/fileio.c
index a05dbd5f22194859164f810875196a96a7de1fb0..6560f28bb70c29fadf9ecc506f00df945bdb776d 100644
(file)
--- a/
src/fileio.c
+++ b/
src/fileio.c
@@
-1251,7
+1251,7
@@
See also the function `substitute-in-file-name'.")
/* Get rid of any slash at the end of newdir, unless newdir is
just // (an incomplete UNC name). */
length = strlen (newdir);
- if (IS_DIRECTORY_SEP (newdir[length - 1])
+ if (
length > 0 &&
IS_DIRECTORY_SEP (newdir[length - 1])
#ifdef WINDOWSNT
&& !(length == 2 && IS_DIRECTORY_SEP (newdir[0]))
#endif